package com.mybatis.controller;
import com.mybatis.entity.Order;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @author 黄飞
 */
@Controller
@RequestMapping(value = "/order")
public class OrderController {

    /**
     * 
     * @return
     */
    @GetMapping
    @ResponseBody
    public String query(@RequestBody Order order){
        return "查询";
    }
    @PostMapping
    @ResponseBody
    public String save(@RequestBody Order order){
        return "添加";
    }
    @DeleteMapping(value = "{id}")
    @ResponseBody
    public String delete(@PathVariable(value = "id") Integer id){
        System.out.println(id+"删除成功");
        return "删除";
    }
    @PutMapping
    @ResponseBody
    public String update(@RequestBody Order order){
        return "修改成功";
    }
}
